package com.yhf.service.impl;

import com.yhf.bean.LoginForm;
import com.yhf.bean.Teacher;
import com.yhf.mapper.TeacherMapper;
import com.yhf.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;
    @Override
    public Teacher login(LoginForm loginForm) {
        return teacherMapper.login(loginForm);
    }

    @Override
    public int updatePassword(Teacher teacher) {
        return teacherMapper.updatePassword(teacher);
    }

    @Override
    public List<Teacher> getTeacherList(Teacher teacher) {
        return teacherMapper.getTeacherList(teacher);
    }

    @Override
    public Teacher findByName(String name) {
        return teacherMapper.findByName(name);
    }



    @Override
    public int updateTeacher(Teacher teacher) {
        return teacherMapper.updateTeacher(teacher);
    }

    @Override
    public int deleteTeacher(Integer[] ids) {
        return teacherMapper.deleteTeacher(ids);
    }

    @Override
    public int addTeacher(Teacher teacher) {
        return teacherMapper.addTeacher(teacher);
    }


}
